package com.project.rbac.controller;


import com.project.rbac.common.JsonData;
import com.project.rbac.common.ResultInfo;
import com.project.rbac.entity.SysDept;
import com.project.rbac.param.DeptParam;
import com.project.rbac.service.ISysDeptService;
import com.project.rbac.service.impl.SysDeptServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 部门表 前端控制器
 * </p>
 *
 * @author nickBoy
 * @since 2021-06-15
 */
@RestController
@RequestMapping("/rbac/sys-dept")
@Slf4j
public class SysDeptController {

    @Autowired
    private ISysDeptService sysDeptService;

    @PostMapping("save")
    public JsonData save(@RequestBody SysDept sysDept) {
        Integer id = sysDeptService.insert(sysDept);
        return JsonData.success(id,"新增成功",200);
    }

}
